<?php

ob_start();

include "../site_specific/project.php";
include "../includes/constants.php";
include "../site_specific/external_constants.php";
include "../includes/phpmailer/class.phpmailer.php";
include "../includes/phpmailer/class.smtp.php";
include "../includes/utilities.php";
include "../includes/pages.php";
include "../includes/database.php";
include "../includes/users.php";
include "../includes/date.php";
include "../includes/files.php";
include "../includes/text.php";
include "../includes/tableproperties.php";
include "../includes/shopping_cart.php";
include "../includes/init.php";

#flag for the login
$flag_login=false;



if ($USER -> isLoggedIn()) {
	header("Location: http://mrt.cai.uq.edu.au/front/index.php");
} 
else {
	$output = '';
	
	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	# S T A R T   H T M L
	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	$output .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
	
	$output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en-AU\" xml:lang=\"en-AU\">\n";
	
	$output .= "<!-- Created by Cameron Morrow for Zone 4 -->\n";
	
	$output .= "<head>\n";
	
	$output .= "\t<title>" . $PROJECT_TITLE . " - " . $PAGE_NAME . "</title>\n";
	
	$output .= "\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n";
	
	$output .= "\t<script language=\"javascript\" type=\"text/javascript\" src=\"../site_specific/assets/scripts/tct.js\"></script>\n";
	$output .= "\t<style type=\"text/css\">\n";
		
	$output .= "\t\t@import url(\"../site_specific/assets/styles/main.css\");\n";
	
	$output .= "\t</style>\n";

	$output .= "</head>\n";

	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	# B O D Y
	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	$output .= "<body onload=\"parseImagePopups();\" class=\"" . ($PAGE_COMPACT ? "compact" : ($IS_SHOWING_LOGIN ? "login" : "")) . "\">\n";
	#login header
	$output .= "<div id=\"Login_Header\">";
	
	//$output .= "<h1>" . $PROJECT_TITLE . " - " . $PAGE_NAME . "</h1>\n";
	
	#login header close
	$output .= "</div>";
	
	#login black area between header and main content. 
	$output .= "<div id=\"Login_Black\">";
	
	#login black area close
	$output .= "</div>";
	
	#login main content frame area
	$output .= "<div id=\"Login_Main\">";
	
	#login content area
	$output .= "<div id=\"Login_Content\">";
	
	#Welcome words
	$output .= "<div id=\"Login_Welcome\">";
	
	$output .= "WELCOME TO THE LOGIN PAGE FOR THE MAGNETIC RESONANCE THECHNOLOGY POSTGRADUATE PROGRAM";
	
	#Welcome words close
	$output .= "</div>";
	
	#login frame
	$output .= "<div id=\"login\"><form name=\"loginform\" id=\"loginform\" action=\"index.php\" method=\"post\">";
	
	$output .= "<TABLE><TR><TD class=\"td_login_label\"><label for=\"loginid\"><strong>USER ID:</strong></label></TD><TD><input type=\"text\" name=\"loginid\" id=\"loginid\" value=\"\" class=\"login_input\"/></TD></TR>";
	
	$output .= "<TR><TD class=\"td_login_label\"><label for=\"loginpassword\"><strong>PASSWORD:</strong></label></TD><TD><input type=\"password\" name=\"loginpassword\" id=\"loginpassword\" value=\"\" class=\"login_input\"/></TD></TR>";
	
	$output .= "<TR><TD><input type=\"radio\" name=\"loginpermission\" id=\"loginpermission\" value=\"student\" checked=\"true\" style=\"visibility:hidden;\"/></TD><TD><input type=\"submit\" value=\"\" class=\"login_button\"/></TD></TR></TABLE>";
	
	//$output .= "<p><span id=\"useridspan\"><label for=\"loginid\"><strong>USER ID:</strong></label> <input type=\"text\" name=\"loginid\" id=\"loginid\" value=\"\" /></span> <span id=\"passwordspan\"><label for=\"loginpassword\"><strong>PASSWORD:</strong></label> <input type=\"password\" name=\"loginpassword\" id=\"loginpassword\" value=\"\" /><input type=\"radio\" name=\"loginpermission\" id=\"loginpermission\" value=\"student\" checked=\"true\" style=\"visibility:hidden;\"/></span><span id=\"loginbuttonspan\"><input type=\"submit\" value=\"GO\" class=\"button\" /></span></p>";
	
	#login frame close
	$output .= "</form></div>";
	
	#Login Comment
	$output .= "<div id=\"Login_Comment\">";
	
	$output .= "Forgotten your password?<br/>";
	
	$output .= "Please contact UQ ITS at help@its.uq.edu.au<br/><br/>";
	
	$output .= "For general information about the <b>Centre for Advanced Imaging</b> and the MRT courses offered, please visit <a href=\"http://www.cai.uq.edu.au\">www.cai.uq.edu.au</a><br/><br/>";
	
	$output .= "For more information about the University of Queensland, go to <a href=\"http://www.uq.edu.au\">www.uq.edu.au</a><br/>";
	
	$output .= "<img src=\"../site_specific/assets/images/login/icon1.png\"/><br/>";
	
	#Login Comment close
	$output .= "</div>";
	
	#login content close
	$output .= "</div>";
	
	#login main content close
	$output .= "</div>";
	
	$output .= "<div id=\"Login_Footer\">";
	
	$output .= "<br/><div id=\"Login_Footer_Text\">Copyright&#169;2010. Centre for Advanced Imaging The University of Queensland. All rights reserved.</div>";
	
	$output .= "</div>";
	
	echo $output;
}

if(!$flag_login){

}
else{
	
}

ob_end_flush();

?>